package main

// "dust/demo/variable"

import (
	"dust/demo/reflecttest"
	"fmt"
)

func main() {

	// args := []int{1, 2, 3, 4}
	// test(args...)

	// number1, number2, string1 := returnTwo()

	// fmt.Printf("number1: %v\n", number1)
	// fmt.Printf("number2: %v\n", number2)
	// fmt.Printf("string1: %v\n", string1)

	// func1()
	// var func1 = func() {
	// 	print("success!!!!")
	// }
	// func1()

	// excute(func(str string) {
	// 	print("call back" + str)
	// })

	// person1 := Person{"my name"}
	// person1.printName()

	reflecttest.Execute()
}

type Person struct {
	name string
}

func (p Person) printName() {
	fmt.Print(p.name)
}

func excute(call func(string)) {
	call("123")
}

func returnTwo() (int, int, string) {
	return 1, 2, "111"
}

func test(args ...int) {
	fmt.Printf("args: %v\n", args)
}

func PrintType(args ...interface{}) {
	for _, arg := range args {
		switch arg.(type) {
		case int:
			fmt.Println(arg, "is an int value.")
		case string:
			fmt.Println(arg, "is a string value.")
		case int64:
			fmt.Println(arg, "is an int64 value.")
		default:
			fmt.Println(arg, "is an unknown type.")
		}
	}
}

func jingsai() {

}
